package com.student.service.impl;

import com.student.dao.UserDao;
import com.student.dao.impl.UserDaoImpl;
import com.student.entity.User;
import com.student.service.UserService;

public class UserServiceImpl implements UserService {
	private UserDao userDao = new UserDaoImpl();
	
	@Override
	public boolean checkUser(User user) {
		User tempUser = userDao.findUserByName(user.getUname());
		if (tempUser != null) {
			if(tempUser.getUpassword().equals(user.getUpassword())) {
				return true;
			} else {
				return false;
			}
		}
		return false;
	}

}
